//
//  CompanyMembersCell.m
//  NtoccShipper
//
//  Created by mac on 2020/1/9.
//  Copyright © 2020 zhuchongjin. All rights reserved.
//

#import "CompanyMembersCell.h"
#import "UIImage+HDExtension.h"

@interface CompanyMembersCell()
@property (nonatomic,strong) CJLabel *labName;
@property (nonatomic,strong) CJLabel *labPhone;
@property (nonatomic,strong) UIImageView *imgVHead;
@property (nonatomic, strong) CJView *allocatedBalanceView;
@end
@implementation CompanyMembersCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setCellInfoWithModel:(CompanyMembersModel *)model{
    self.labName.text = model.userName;
//    self.labPhone.text = model.phone;wpsjin
//    [self.imgVHead sd_setImageWithURL:[NSURL URLWithString:[CJControl getThreeUnaryValueStr:model.headImg]] placeholderImage:[UIImage imageNamed:@"zcj_default_person_icon"]];
    
    if ([CJRegular getIsStrEmpty:[CJControl getThreeUnaryValueStr:model.headImg]]) {
        self.imgVHead.image = [UIImage imageNamed:@"zcj_default_person_icon"];
    }else{
//        [self.imgVHead sd_setImageWithURL:[NSURL URLWithString:[CJControl getThreeUnaryValueStr:model.headImg]] placeholderImage:[UIImage imageNamed:@"zcj_default_person_icon"]];
        self.imgVHead.image = [UIImage hd_captureCircleImageWithURL:[CJControl getThreeUnaryValueStr:model.headImg] andBorderWith:0 andBorderColor:[UIColor cjClearColor]];
    }
    if(model.staffType == 3){
        self.allocatedBalanceView.hidden = NO;
    }else{
        self.allocatedBalanceView.hidden = YES;
    }
}

- (void)btnCilckPhoneNum{
    if (self.blockPhone) {
        self.blockPhone(@"");
    }
}
- (void)delectAppectGroupAction{
    if (self.blockDelete) {
        self.blockDelete(@"");
    }
}
- (void)changeAppectGroupAction{
    if (self.blockEditor) {
        self.blockEditor(@"");
    }
}
- (void)allocatedBalanceAction{
    if(self.blockFenP){
        self.blockFenP(@"");
    }
}
@end
